package com.onluy.frameworkcloud.batis.bean;

import org.apache.ibatis.executor.BatchExecutor;

public class Batch
{
    private BatchExecutor batchExecutor;
    private int counter;

    public Batch(int counter)
    {
        this.counter = counter;
    }

    public BatchExecutor getBatchExecutor() {
        return this.batchExecutor;
    }

    public int getCounter() {
        if (this.counter > 0) {
            this.counter -= 1;
        }
        return this.counter;
    }

    public void setBatchExecutor(BatchExecutor batchExecutor) {
        this.batchExecutor = batchExecutor;
    }
}